import { createRouter, createWebHistory } from "vue-router";

const routes = [
  {
    path: "/",
    name: "Home",
    component: () => import("@/pages/Home.vue"),
  },
  {
    path: "/form/design",
    name: "FormDesign",
    component: () => import("@/form/design-mode/index.vue"),
  },
  {
    path: "/form/view",
    name: "FormView",
    component: () => import("@/form/run-mode/index.vue"),
  },
];

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL), // 或者使用 createWebHashHistory() 创建 hash 路由模式
  routes,
});

export default router;
